import { useStore } from '@/store'

export function usePermission(pageName: string, permissionName: string) {
  const store = useStore()
  const permissions = store.state.login.permissions
  const verifyPersmission = `system:${pageName}:${permissionName}`
  return permissions.some(item => item === verifyPersmission)
}
